package com.wuzhazha.javamind.chapter15.test04;

public class Coffee {

    private static long counter = 0;

    private final long id = counter++;

    @Override
    public String toString() {
        return getClass().getSimpleName() + " " + id;//返回类型名称和counter值
    }
}
